import { findById } from "@/services/student";

export default {
    namespaced:true,
    state:{
        updateVisible:false,
        student:{}
    },
    mutations:{
        setUpdateVisible(state,payload){
            state.updateVisible = payload;
        },
        setStudent(state,payload){
            state.student = payload;
        }
    },
    actions:{
        async setStudent({commit},id){
            let data = await findById(id);
            commit('setStudent',data);
        }
    }
}